#ifndef EDITWIDGET_H
#define EDITWIDGET_H

#include <QWidget>
#include <QLineEdit>
#include <QLabel>
#include <QDialog>
#include <QPushButton>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QFile>
#include <QMessageBox>
#include <QRadioButton>
#include <QButtonGroup>
#include <QDebug>
#include <QDateTime>
#include <QDateTimeEdit>
#include <QTime>

class EditWidget : public QDialog
{
    Q_OBJECT
public:
    explicit EditWidget(QWidget *parent = nullptr);

private:
    bool isCountDownMode = true;  //是否是倒计时模式标志

    QVBoxLayout *mainLayout; //主布局
    QHBoxLayout *modeLayout; //模式选择区布局
    QHBoxLayout *editLayout; //编辑区布局
    QHBoxLayout *controlLayout;

    QRadioButton *countDownMode;  //倒计时模式
    QRadioButton *timingMode;   //定时模式

    QPushButton *OkButton; //确认按钮
    QPushButton *cancelButton; //取消按钮

    QTime *timeEdit;

    QLineEdit *hourLine;
    QLineEdit *minLine;
    QLineEdit *secLine;

    void slot_onClickedOkButton();
    void slot_onClickedCancelButton();

signals:
    void signal_changeTime(int,int,int);
public slots:
    void slot_onClickedModeGroup(int);
};

#endif // EDITWIDGET_H
